# =============================================================
# Makefile 
# ---------------------------------------
# Author : Woo-Hyun Kim
# Email : woorung@nhncorp.com
# Date : Jun. 18, 2007
# =============================================================
include ../../etc/profile.mk

# common configuration
CC = g++
#DEFS = -Wno-deprecated

# target
OBJS = CStatus.o
EXES = CStatusTest

all : $(OBJS) lib lib-allinone $(EXES)

CStatusTest : CStatusTest.cpp
	$(CC) $(DEFS) -I$(WNXI)/statgrab -I$(WNI) -o $@ CStatusTest.cpp $(WNL)/libwn.a $(WNXL)/libstatgrab.a
	@echo $@ is completed.

CStatus.o : CStatus.cpp
	$(CC) $(DEFS) -c CStatus.cpp -I$(WNXI)/statgrab -I$(WNI)

lib :
	ar -ruv $(WNL)/libwn.a $(OBJS)
	ranlib $(WNL)/libwn.a
	cp *.h $(WNI)/
	@echo $(OBJS) was added to libwn.a

lib-allinone :
	ar -ruv $(WNL)/libwn-allinone.a $(OBJS)
	ranlib $(WNL)/libwn-allinone.a
	@echo libwn-allinone.a completed.

clean :
	$(RM) *.o $(OBJS) $(EXES)
